package com.wayhome.srpingbootmybatis.placeCloud.controller;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.wayhome.srpingbootmybatis.placeCloud.dto.ImportPlaceData;
import com.wayhome.srpingbootmybatis.placeCloud.dto.PlaceCloudPharCfgDTO;

import java.util.ArrayList;
import java.util.List;

public class QuyupingtaiCnfLister  extends AnalysisEventListener<PlaceCloudPharCfgDTO> {

    private List<PlaceCloudPharCfgDTO> list = new ArrayList<>();

    public List<PlaceCloudPharCfgDTO> getList() {
        return list;
    }

    @Override
    public void invoke(PlaceCloudPharCfgDTO placeCloudPharCfgDTO, AnalysisContext analysisContext) {
        list.add(placeCloudPharCfgDTO);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        System.out.println("完事，，一共：" + list.size() + "条");
    }
}
